package com.karrim.client.mvp.presenter;

import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;
import com.gwtplatform.mvp.client.proxy.RevealContentEvent;
import com.karrim.client.mvp.NameTokens;

/**
 *
 * @author andrea.cantafio
 */
public class FilePresenter extends Presenter<FilePresenter.NView, FilePresenter.NProxy> {

    public interface NView extends View {
    }

    @ProxyCodeSplit
    @NameToken(NameTokens.file)  // Do not use {';', '=', '/'} !
    public interface NProxy extends ProxyPlace<FilePresenter> {
    }

    @Inject
    public FilePresenter(EventBus eventBus, NView view, NProxy proxy) {
        super(eventBus, view, proxy);
    }    
    
    @Override
    protected void revealInParent() {
        RevealContentEvent.fire(this, MainPresenter.TYPE_SET_MAIN_CONTENT, this);
    }
}
